home *** CD-ROM | disk | FTP | other *** search
/ El Mac 7 / El Mac 7.iso / Actualizaciones / BBEdit 3.5.2 Update / 3.5.2 Scripting Changes < prev    next >
Encoding:
Text File  |  1996-01-02  |  3.2 KB  |  76 lines  |  [TEXT/R*ch]

  1. Scripting Changes in BBEdit 3.5.2
  2. --------- ------- -- ------ -----
  3.  
  4. In BBEdit 3.5.2, we are pleased to introduce partial support for the
  5. Apple Event Object Model ("object model", or "AEOM" for short) into
  6. BBEdit's scripting implementation.
  7.  
  8. In general terms, the object model provides access to items in an
  9. application as individual objects, or "elements". In the context of
  10. BBEdit, support for the Object Model makes it possible for you to refer
  11. to the contents of an editing window as individual elements: characters,
  12. words, and lines.
  13.  
  14. Previous versions of BBEdit did not offer this level of access to the
  15. text, and so performing script-based text transformations with BBEdit
  16. was difficult. With support for the object model, the possibilities are
  17. greatly expanded. We're pleased to bring you these improvements, and
  18. welcome your comments. We are continually working to improve the level
  19. of scripting support in BBEdit; look for these improvements to appear in
  20. future maintenance and major releases of BBEdit.
  21.  
  22. As always, you should refer to BBEdit's script dictionary for the
  23. details about what objects and commands are supported. Although we
  24. cannot provide information about AppleScript syntax or semantics, and we
  25. cannot write your scripts for you, we will be happy to address any
  26. questions you may have about BBEdit's specific abilities.
  27.  
  28. The changes described here are relevant for script writers who have
  29. already written scripts to control BBEdit. As the result of Object Model
  30. support, your scripts may require some changes in order to work with
  31. BBEdit 3.5.2.
  32.  
  33. -    Words, lines, and characters within a specific window can now be
  34.     individually accessed, as in:
  35.     
  36.     get character 1 of line 3 of window 1
  37.     set line 3 of window "untitled" to "abcdef"
  38.         
  39. -    the "window" class has been split into two classes: "window"
  40.     and "document". The "document" class is a superset of the "window"
  41.     class: in addition to the properties specific to a window on the
  42.     screen, the document class contains the properties describing
  43.     an open editing or browsing document window. In most cases,
  44.     you can use "window" and "document" interchangeably.
  45.     
  46. -    The following window properties are obsolete and are no longer
  47.     supported:
  48.     
  49.     character count (use "count of characters in document 1")
  50.     word count (use "count of words in document 1")
  51.     line count (use "count of lines in document 1")
  52.     
  53. -    the "send to back" and "exchange with next" events are no
  54.     longer supported. Instead, set the "index" property of the
  55.     given window:
  56.     
  57.     set the index of window 1 to (count of windows) -- send to back
  58.     set the index of window 2 to 1 -- exchange with next
  59.     
  60. -    the "get search string" event is no longer supported. Instead,
  61.     access the "search string" property of the application:
  62.     
  63.     get the search string -- gets the search string
  64.     set the search string to "my new string" -- sets the search string
  65.     
  66.     (the "replace string" property of the application carries over
  67.     from BBEdit 3.5.1.)
  68.  
  69. -    In the current scripting implementation, most of BBEdit's
  70.     transformation commands still operate on the front document window,
  71.     and do not accept a window or text reference. In the future, this
  72.     will be expanded so that you can, for example, Zap Gremlins on a
  73.     specific range of text.
  74.  
  75. =end=
  76.